
pkgname=gobject-introspection
pkgver=1.56.1
_pkgver=1.56
pkgrel=1
pkgdesc="Introspection system for GObject-based libraries"
url="https://live.gnome.org/GObjectInstrospection"
arch=('x86_64')
license=('LGPL' 'GPL')
depends=('libffi' 'glib2' 'python3')
makedepends=('cairo')
options=('!libtool')
source=("https://ftp.gnome.org/pub/gnome/sources/${pkgname}/${_pkgver}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('5b2875ccff99ff7baab63a34b67f8c920def240e178ff50add809e267d9ea24b')


build() {
  cd ${pkgname}-${pkgver}
  
  PYTHON=/usr/bin/python3 ./configure --prefix=/usr --disable-static
  make
}

package() {
  cd ${pkgname}-${pkgver}
  
  make DESTDIR=${pkgdir} install
  
    sed -i '1s|#!/usr/bin/env python$|&3|' ${pkgdir}/usr/lib/gobject-introspection/giscanner/*.py
}

